package com.qd.pay.domain;
import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


/**
 * 扩展参数
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class OrderExtendedDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "订单ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "订单ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String orderId;
    /**
     * 附加数据
     */
    @NotBlank(message = "附加数据不能为空", groups = DefaultGroup.class)
    @Size(max = 500, message = "附加数据长度不能超过{max}位", groups = DefaultGroup.class)
    private String attach;

    @Override
    public void freeData() {
        this.orderId = null;
        this.attach = null;
        super.freeData();
    }
}
